﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kokomo.Mirror.Ia32
{
	public struct ScaleIndexBase
	{
		public ScaleIndexBase(byte value)
			: this()
		{
			this.Value = value;
		}

		public byte Value { get; private set; }

		public int SS { get { return (this.Value & 0xC0) >> 6; } }
		public Index Index { get { return (Index)((this.Value & 0x38) >> 3); } }
		public Base Base { get { return (Base)(this.Value & 0x07); } }

		public int ScaleFactor { get { return 1 << this.SS; } }
	}
}
